<?php
$xmlstr= '<Address><to>James</to><from>Jani</from><heading>Reminder</heading><body>Please check your mail.</body></Address>' ;
$xml=simplexml_load_string($xmlstr);
//echo $xml->getName;die;
$sxe = new SimpleXMLElement($xmlstr);

echo $sxe->getName() . "<br/>";


foreach ( $xml as $key => $value ) 
 { 
    echo $key .':'.$value;
     echo '<br/>';
 } 
die;
     
//var_dump($newArray);die;




function GeneratePassword($num,$str){
    $str = str_shuffle($str);
    $str = substr($str,0,$num);
    echo $str;
}
//echo GeneratePassword(7,'abczxc012394');exit;
die;


$arr = array(34,54,67,68,141,151,161,141,54,151,54);

$arr=array_unique($arr);
echo implode(',',$arr);
die;

$arr = array(array(141,151,161), 2, 3, array(101, 202, array(303,404)));

global $new_arr;
$new_arr=array();
function get_Arr($arr){
    global $new_arr;
    if(is_array($arr)){
        foreach($arr as $v){
            if(is_array($v)){
               get_Arr($v); 
            }else{
                $new_arr[]=$v;
            }
            
            
        }
        
    }else{
       $new_arr[]=$arr;
    }
}
get_Arr($arr);
sort($new_arr);
echo $new_arr[count($new_arr)-1];
//var_dump($new_arr);die;

?>